Kameleon-Plus  0.3.2
OpenGGCMInterpolator.h
Go to the documentation of this file.
1 /*
2  * OpenGGCMInterpolator.h
3  *
4  * Created on: Jun 30, 2009
5  * Author: dberrios
6  */
7 
8 #ifndef OPENGGCMINTERPOLATOR_H_
9 #define OPENGGCMINTERPOLATOR_H_
10 
11 #include "Interpolator.h"
12 #include "Model.h"
13 
14 namespace ccmc
15 {
23  {
24  public:
25  OpenGGCMInterpolator(Model * modelReader);
26  float interpolate(const std::string& variable, const float& c0, const float& c1, const float& c2);
27  float interpolate(const std::string& variable, const float& c0, const float& c1, const float& c2,
28  float& dc0, float& dc1, float& dc2);
29  float interpolate(const long& variable_id, const float & c0, const float& c1, const float& c2);
30  float interpolate(const long& variable_id, const float& c0, const float& c1, const float& c2, float& dc0,
31  float& dc1, float& dc2);
32  float getConversionFactor(const std::string&);
33  float getConversionFactor(const long& variable_id);
34  virtual ~OpenGGCMInterpolator();
35 
36  private:
37  Model * modelReader;
38  boost::unordered_map<std::string, float> conversionFactors;
39  boost::unordered_map<long, float> conversionFactorsByID;
40 
41 
42 // int nx;
43 // int ny;
44 // int nz;
45  const std::vector<float> * x_array;
46  const std::vector<float> * y_array;
47  const std::vector<float> * z_array;
48  std::string previousVariable;
49  long previousVariableID;
50  float previousConversionFactor;
51  float previous_x;
52  float previous_y;
53  float previous_z;
54  int previous_ix;
55  int previous_iy;
56  int previous_iz;
57  float previousValue;
58  };
59 }
60 #endif /* OPENGGCMINTERPOLATOR_H_ */